#!/bin/bash

# 动态库的安装
echo ">>>>Install 3rd Librarys"

function InstallRpm() {
	rpm -ivh --nomd5 --nodeps --force $1 > /dev/null
}

# oracle客户端库
echo ">>>>>>>>Install Oracle Client API Library"
#InstallRpm oracle-instantclient11.2-basic-*.x86_64.rpm
#InstallRpm oracle-instantclient11.2-devel-*.x86_64.rpm
#InstallRpm oracle-instantclient11.2-sqlplus-*.x86_64.rpm

echo ">>>>>>>>Add Oracle Client API Library Path to System"
if [ "$(grep /usr/lib/oracle/11.2/client64/lib /etc/ld.so.conf)" == "" ]; then
	echo /usr/lib/oracle/11.2/client64/lib >> /etc/ld.so.conf
	echo "ADD oracle path to ld.so.conf"
else
	echo "oracle path in ld.so.conf already exists"
fi

ldconfig

